package cn.gzjp.modules.wx.entity;

import org.hibernate.validator.constraints.Length;

import cn.gzjp.common.persistence.DataEntity;
import cn.gzjp.common.utils.excel.annotation.ExcelField;

/**
 * 小程序配置信息Entity
 * @author zengcp
 * @version 2018-04-03
 */
public class WxMpAccount extends DataEntity<WxMpAccount> {
	
	private static final long serialVersionUID = 1L;
	private String secret;		// appSecret
	private String mchId;		// 微信支付商户号
	private String mchKey;		// 微信支付平台商户API密钥
	private String name;		// 名称
	private String keyPath;     //apiclient_cert.p12 证书文件的绝对路径

	private String templateId;//模板消息()

	private String type;		// 1工厂与货主 2司机 3专线合伙人


	
	public WxMpAccount() {
		super();
	}

	public WxMpAccount(String id){
		super(id);
	}

	@Length(min=0, max=64, message="appSecret长度必须介于 0 和 64 之间")
	@ExcelField(title="appSecret", align=2, sort=1)
	public String getSecret() {
		return secret;
	}

	public void setSecret(String secret) {
		this.secret = secret;
	}
	
	@Length(min=0, max=255, message="微信支付商户号长度必须介于 0 和 255 之间")
	@ExcelField(title="微信支付商户号", align=2, sort=2)
	public String getMchId() {
		return mchId;
	}

	public void setMchId(String mchId) {
		this.mchId = mchId;
	}
	
	@Length(min=0, max=255, message="微信支付平台商户API密钥长度必须介于 0 和 255 之间")
	@ExcelField(title="微信支付平台商户API密钥", align=2, sort=3)
	public String getMchKey() {
		return mchKey;
	}

	public void setMchKey(String mchKey) {
		this.mchKey = mchKey;
	}
	
	@Length(min=0, max=200, message="名称长度必须介于 0 和 200 之间")
	@ExcelField(title="名称", align=2, sort=4)
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getKeyPath() {
		return keyPath;
	}

	public void setKeyPath(String keyPath) {
		this.keyPath = keyPath;
	}

	public String getTemplateId() {
		return templateId;
	}

	public void setTemplateId(String templateId) {
		this.templateId = templateId;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}
}